Looking for some guidance on a way to debug a DXL program that keeps hanging up.
A while ago I modified the export to HTML program to handle what we defined as inLineTables. Basically this allows us to copy and paste files from Excel into the Object Text and then use another boolean attribute that specifies this object is an inLineTable. If it finds that an object is declared an inline table it then processes that object to a function that converts the TAB separated data and generates the necessary HTML to produce a table. This has been working fine for about a year, no problems.
Recently a specific module hangs up, the exporter never completes. The only way to stop DOORS is via the Task Manager. After killing DOORS I examined the resultant file that was being produced. Examining 3 or 4 runs of the same module, the output always ended mid-way into a specific object at a specific point in that object. So I put some debug statements to attempt to output the intermediate processing that was occurring to see what was happening. At first tried just debugging via print statements. Unfortunately once the program hangs, there is no way to examine the DXL output when it is hung and killing DOORS destroys the DXL window. So I then modified the debugs statements to output to a stream. So when I abort I can examine the file created. From the data produced, it appears that the function completed for the specific object in question. Because of the volume of data the debug was producing I set up the debug and output to start on specific object (it would open the stream at the beginning and then close it after it completed).
So I am now needing to attempt to "go back" further within the basic html export to try to figure out what is happening. At the moment am attempting debugging using print statements, but as mentioned, can't get to the results.
I attempted to change the pragma runLim from 0 to a fixed value. Doing so, I am able to "advance" the execution until it gets to the obect where it is hanging up. However, it doesn't appear that the halt execution returns control to allow me to examine the DXL window, again the only option I have available is to kill DOORS, leaving me back at square one. Note I have a progressBar running and perhaps this is what is causing the failure to return.
So, does anyone have any ideas on how I might continue to debug this problem? Is there some hidden way to get behind the scenes to determine where in the heck the DXL is executing? Maybe something like if a DXL program throws a Execution error it provides a traceback method.
Any thoughts or ideas would be greatly appreciated.
TIA Frank F-Skier - Fri Apr 21 08:13:06 EDT 2017 |
Re: Debugging DXL hanging Usually if DXL is really HANGING it is waiting for an external process. In your case this will probably be an OLE Server like Word, Excel etc. Launch Process Explorer from sysinternals to see if DOORS spawned any external processes, and terminate them. This might make your DXL come back to life. If your DXL is really running very long, you should think about a progress mechanism communicating the progress to the outside (e.g. write a message to a file each second to verify that the DXL is really hanging). Put this code inside the most time consuming loops. Maybe that helps, regards, Mathias |